package live.ifox.toolbox;

import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import java.util.List;
import java.util.Map;

import live.ifox.factory.PermissionInfo;
import live.ifox.helper.AdapterHelper;

public class PermissionActivity extends BaseActivity {
    ListView listView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_permission);
        actionBar.setTitle(R.string.permission_info);

        listView = findViewById(R.id.listView);

        PermissionInfo permissionInfo = new PermissionInfo(this);
        List<Map<String, Object>> infoModel = permissionInfo.getModel();
        SimpleAdapter adapter = AdapterHelper.getTableAdapter(this, infoModel,
                new String[]{"label", "detail"});
        listView.setAdapter(adapter);
    }
}
